package net.lahuobao.mall.service.impl.finance;

import net.lahuobao.mall.dao.finance.MallReportMapper;
import net.lahuobao.mall.entity.finance.MallCarriersExpenditureAccount;
import net.lahuobao.mall.entity.finance.MallMiddleExpenditureAccount;
import net.lahuobao.mall.entity.finance.MallMiddleIncomeAccount;
import net.lahuobao.mall.entity.finance.MallOrderReportQueryModel;
import net.lahuobao.mall.entity.finance.resultmodel.MallOrderReportResultModel;
import net.lahuobao.mall.service.finance.MallReportServiceI;
import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by clark on 2016/9/2 0002.
 */
@Service("mallReportService")
public class MallReportServiceImpl extends CommonServiceImpl implements MallReportServiceI{


    @Resource
    private MallReportMapper mallReportMapper;

    /**
     * 查询中间商收入账户
     * @param mallMiddleIncomeAccount
     * @return
     */
    @Override
    public List<MallMiddleIncomeAccount> selectMallMiddleIncomeAccount(MallMiddleIncomeAccount mallMiddleIncomeAccount) {
        return  mallReportMapper.selectMallMiddleIncomeAccount(mallMiddleIncomeAccount, getPageBounds());
    }

    /**
     * 查询中间商收入账户
     * @param mallMiddleExpenditureAccount
     * @return
     */
    @Override
    public List<MallMiddleExpenditureAccount> selectMallExpenditureAccount(MallMiddleExpenditureAccount mallMiddleExpenditureAccount) {
        return  mallReportMapper.selectMiddleExpenditureAccount(mallMiddleExpenditureAccount, getPageBounds());
    }


    /**
     * 查询承运商支出账户
     * @param mallCarriersExpenditureAccount
     * @return
     */
    @Override
    public List<MallCarriersExpenditureAccount> selectCarriersExpenditureAccount(MallCarriersExpenditureAccount mallCarriersExpenditureAccount) {
        return  mallReportMapper.selectCarriersExpenditureAccount(mallCarriersExpenditureAccount, getPageBounds());
    }

    /**
     * 订单报表
     * @param query
     * @return
     */
    @Override
    public List<MallOrderReportResultModel> selectMallOrderReport(MallOrderReportQueryModel query) {
        return mallReportMapper.selectMallOrderReport(query, getPageBounds());
    }
}
